

add_executable(lcm_pub lcm_publisher.cpp)
add_executable(lcm_ser lcm_service.cpp)

set(LCM_LIBRARIES "/usr/local/lib/liblcm.so")
target_link_libraries(lcm_ser ${LCM_LIBRARIES})
target_link_libraries(lcm_pub ${LCM_LIBRARIES})


target_link_libraries(lcm_pub "${TORCH_LIBRARIES}")
set_property(TARGET lcm_pub PROPERTY CXX_STANDARD 17)

target_link_libraries(lcm_ser "${TORCH_LIBRARIES}")
set_property(TARGET lcm_ser PROPERTY CXX_STANDARD 17)

set(use_onnx ON)
if(use_onnx)
    set(ONNXRUNTIME_DIR "~/packages/onnxruntime")
    #set(ONNXRUNTIME_DIR "/home/saw/RL/ENV/onnxruntime/onnxruntime")
    include_directories(${ONNXRUNTIME_DIR}/include)
    link_directories(${ONNXRUNTIME_DIR}/lib)
endif()



add_executable(lcm_onnx ${sources} lcm_publisher_onnx.cpp)


if(use_onnx)
    target_link_libraries(lcm_onnx onnxruntime)
endif()

target_link_libraries(lcm_onnx ${LCM_LIBRARIES})

